/**
 * Created by baoman on 2017/4/6.
 */
angular.module(moduleName + '.directives')
  .directive('hrServiceOnline',function(){
    return{
      restrict:'EA',
      templateUrl:'hr-service-online/hr-service-online.html',
      relace:true,
      scope:{
        serviceHeader:"=",
        customerHeader:"="
      },
      link:function(scope){
        scope.sendMessage = sendMessage;

        scope.date = new Date();

        scope.messageList = [{
          isRequest:true,
          content:"您好，请问有什么需要帮助的吗？"
        }];

        function sendMessage(){
          if(scope.reply) {
            scope.messageList.push({
              isRequest:false,
              content:scope.reply
            });
            scope.messageList.push({
              isRequest:true,
              content:'我们会尽快处理您的问题'
            });
            scope.reply = '';
          }
        }
      }
    }
  });